import vue from 'vue'
import VueRouter from "vue-router"
import Detail from "../views/Detail.vue"
import Layout from "../views/Layout.vue"

// 配置二级路由
import HomePage from "../views/HomePage.vue"
import LookFor from "../views/LookFor.vue"
import Information from "../views/Information.vue"
// import from 
import My from "../views/My.vue"
vue.use(VueRouter)
const router = new VueRouter({

    routes: [

        {
            path: '/',
            component: Layout,
            redirect: 'homepage',
            children: [
                { path: '/homepage', component: HomePage },
                { path: '/lookFor', component: LookFor },
                { path: '/information', component: Information },
                { path: '/my', component: My },

            ]
        },
        { path: '/detail/:id', component: Detail },
    ]
})



export default router